package cn.rdq.iknessplatform.controller;

import cn.rdq.api.po.EpisodeSrc;
import cn.rdq.common.CommonResult;
import cn.rdq.iknessplatform.service.EpisodesrcService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@Api
@RequestMapping("/episode-src")
public class EpisodeSrcController {

    @Autowired
    private EpisodesrcService episodesrcService;

    @GetMapping("/epi")
    public CommonResult underEpisodeId(Long episodeId) {
        List<EpisodeSrc> episodeSrcs = episodesrcService.listByEpisodeId(episodeId);
        return CommonResult.successObj(episodeSrcs);
    }

}
